* {
  margin: 0;
  padding: 0;
}

#tab {
  width: 500px;
  height: 400px;
  margin: 20px auto;
}

#nav {
  width: 500px;
  display: flex;
  justify-content: space-around;
}

#nav li {
  width: 100px;
  line-height: 80px;
  background: salmon;
  list-style: none;
  text-align: center;
  cursor: pointer;
}

#nav .active {
  background: red;
  color: white;
}

#content {
  width: 500px;
  height: 400px;

}

#content div {
  width: 500px;
  height: 400px;
  display: none;
}

#content div:nth-child(1) {
  background: seagreen;
  display: block;
}

#content div:nth-child(2) {
  background: darkmagenta;
}

#content div:nth-child(3) {
  background: gold;

}